/**
 * @param {character[]} s
 * @return {void} Do not return anything, modify s in-place instead.
 */
var reverseString = function (s) {

    let len = s.length
    let l = 0
    let r = len - 1

    while (l < r) {
        let tmp = s[l]
        s[l] = s[r]
        s[r] = tmp
        l++
        r--
    }
};

let input = ["h", "e", "l", "l", "o"]
reverseString(input)
console.log(input)

//================v1要点总结===============
/**
 * 1.非常标准的双指针应用
 */